package com.ayf.payment.game.api.service;

import com.ayf.payment.game.api.dto.PartitionChangeDTO;
import com.ayf.payment.game.api.dto.PartitionDTO;
import com.ayf.payment.game.api.dto.criteria.PartitionCriteria;
import com.ayf.payment.game.api.dto.criteria.PartitionPageCriteria;
import com.ayf.payment.game.api.dto.criteria.PartitionSelectCriteria;
import com.ayf.payment.game.api.entity.Partition;
import com.ayf.payment.game.api.utils.CommonResult;

import java.util.List;

public interface PartitionService {

    //获取
    public List<PartitionDTO> selectByDTO(PartitionSelectCriteria selectCriteria);
    //获取分区列表 包含分组
    public List<PartitionDTO>  getPartitionList(PartitionSelectCriteria selectCriteria);
    // 获取订时开区列表
    public List<Partition> selectByOpeningTime(PartitionSelectCriteria selectCriteria);
    //修改分区状态
    public void updateByStatus(Partition t);
    //创建分区
    public Partition createPartition(PartitionCriteria criteria);
    //清空分区数据
    public boolean cleanDataPartition(Integer merchantId, String partitionId,String operIp);
    //更新分区
    public boolean updatePartition(PartitionCriteria criteria);
    //克隆分区
    public String clonePartition(Integer merchantId, String partitionId);
    //加载创建分区
    public CommonResult loadPartition(Integer merchantId, String partitionId, int isClean,String operIp);

    //检测分区
    public CommonResult testingWateGay(PartitionSelectCriteria selectCriteria);

    public void delete(Partition t);

    public Partition find(Integer merchantId, String partitionId);

    public void save(Partition t);

    public PartitionChangeDTO selectPartitionChangeDTO(Integer merchantId, String id);

    /**
     * 判断模板下面是否有分区
     *
     * @param temId
     * @return
     */
    boolean isHavePartitionByTemId(String temId);

    /**
     * 判断是否有该分区
     *
     * @param id
     * @return
     */
    boolean isHavePartitionById(String id);

    /**
     * 更改分区名称
     * @param partition
     * @return
     */
    boolean updatePartitionName(Partition partition);

    /**
     * 查询出分区信息
     *
     * @param criteria
     * @return
     */
    List<PartitionDTO> selectPartitionInfo(PartitionCriteria criteria);

    /**
     * 分页分区
     * @param selectCriteria
     * @return
     */
    List<PartitionDTO> selectByPage(PartitionPageCriteria selectCriteria);

    /**
     * 查询商户的分区数量
     *
     * @param merchantId
     * @return
     */
    int selectPartSum(Integer merchantId);

    //更新分区序号
    void updatePartitionSort(PartitionCriteria criteria);

    PartitionDTO getPartitionInfoById(String partitionId);

    List<PartitionDTO> selectByGameId(PartitionSelectCriteria selectCriteria);

    List<String> selectGameCurrencyName(Integer merchantId);

    // 获取分区名称修改列表
    List<Partition> selectByChangeNameTime(PartitionSelectCriteria selectCriteria);
    //修改分区名称
    void updateByName(Partition t);

}


